- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 8.6k
 
[py] Implement add_request_handler #14604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
          PR Reviewer Guide 🔍Here are some key observations to aid the review process: 
  | 
    
          PR Code Suggestions ✨Explore these optional code suggestions: 
 
  | 
    
| 
           Currently, the   | 
    
820fee6    to
    8fbc580      
    Compare
  
    | 
           It was   | 
    
bac8478    to
    9c0bed1      
    Compare
  
    | 
           
  | 
    
| 
           All local  @VietND96 May the workflow be triggered again?  | 
    
9c0bed1    to
    1b0a879      
    Compare
  
    | 
           @AutomatedTester I would really appreciate your feedback on this. In particular, what are your thoughts on 
  | 
    
1b0a879    to
    fd300a2      
    Compare
  
    | 
           Remote tests were timing out due to requesting external URLs. Changing it to internal ones in   | 
    
db57e5e    to
    9932b4a      
    Compare
  
    | 
           Factored all the repeated functions into   | 
    
9932b4a    to
    81f5078      
    Compare
  
    | 
           run ./scripts/format.sh to help with your formatting  | 
    
| 
           @shbenzer Aha! Thanks!  | 
    
| 
           bidi_tests.py and upload_tests.py are flaky - I've got PRs up to fix them - so don't worry about those results  | 
    
ec4532f    to
    f8494d4      
    Compare
  
    | 
           @shbenzer Perfect! That explains a lot 🎊  | 
    
748d47c    to
    9f535ce      
    Compare
  
    | 
           While adding support for multiple intercepts, noticed that "paused" cached requests are served without waiting for continue request. Not sure if this is intended (from browser end). Since bidi   | 
    
1af8c85    to
    4116a58      
    Compare
  
    | 
           Closing this PR to open a new one (#14738) from a different account for better access management. Thank you for your feedbacks!  | 
    
User description
Description
Implement add_request_handler as described in #13993 . As required, also implemented
network.AddInterceptnetwork.BeforeRequestSentnetwork.ContinueRequestnetwork.RemoveRequestbrowsingContext.NavigateThe dependencies were generated from CDDL entries in BIDI specs
Add an asynchronous navigation function
driver.network.getMotivation and Context
#13993
Types of changes
Checklist
PR Type
Enhancement, Tests
Description
add_request_handlermethod.Changes walkthrough 📝
network.py
Implement network request handling and serialization classespy/selenium/webdriver/common/bidi/network.py
script.py
Add stack trace data classes with serializationpy/selenium/webdriver/common/bidi/script.py
StackFrameandStackTracedata classes.network.py
Introduce Network class for request managementpy/selenium/webdriver/remote/network.py
Networkclass for managing network requests.add_request_handlermethod for request interception.webdriver.py
Integrate Network class into WebDriverpy/selenium/webdriver/remote/webdriver.py
Networkclass into WebDriver.networkproperty for network operations.bidi_network_tests.py
Add tests for network request handlerpy/test/selenium/webdriver/common/bidi_network_tests.py
add_request_handlermethod.